import React, {useState} from 'react';
import {Tab, TabPanel, Tabs} from "react-ui-xmui";

const TabDemo2 = () => {
  const [value2, setValue2] = useState(0)
  const handleOnChange2 = (event, newValue) => {
    setValue2(newValue)
  }
  return (
    <div style={{width:'600px'}}>

      <Tabs onTabsChange={handleOnChange2} value={value2} center>
        <Tab label={'电影'} value={0} key={0}/>
        <Tab label={'电视剧'} value={1} key={1}/>
        <Tab label={'音乐'} value={2} key={2}/>
      </Tabs>
      <div>
        <TabPanel index={0} value={value2}>
          电影
        </TabPanel>
        <TabPanel index={1} value={value2}>
          电视剧
        </TabPanel><TabPanel index={2} value={value2}>
        音乐
      </TabPanel>
      </div>
    </div>
  );
};

export default TabDemo2;